package com.yjzx.util.common.util.batch.mergingLimit;

import lombok.Data;

import java.util.List;
import java.util.function.Function;

/**
 * @author guozhi
 * @date 2025/1/13
 * @description PagingSlot
 */
@Data
public class PagingSlot<T,R> implements Slot, NotNullParam {
    Function<T, Long> totalGet;
    Function<T, List<R>> dataGet;

    public PagingSlot(Function<T, Long> totalGet, Function<T, List<R>> dataGet) {
        this.totalGet = totalGet;
        this.dataGet = dataGet;
        check();
    }
}
